<!DOCTYPE html>
<html>

<head>
    <title>抓包电费</title>
    <script src="./crypto-js-3.3.0/crypto-js.js"></script>
</head>

<body>

    <h1 id="encryptPassword">空</h1>

</body>
<script>
    /* 
7085G13UfSg69m6g8LqYqCz5HuNzlVpFG7T/ePxqu0k4OZ0SxpT1KzAgrUmkHL+TPBc3lrBE/qpAVC1o2d9pHpdElPN9DKDTZ0ytePUDaes=

DBId4iME970xKlAtrKyClfiUaL4QE3xzKOz0/d4hyYAnT1F251jdWSTccLqSw9JyU7PRk8Xmjgnke48eMJuOlQ0z7HPZOow0lFxiwQGMUC8=



LOGIN_PASSWORD_ID: 输入的密码
pwdEncryptSalt: QsIIdVLfEcPnrKT5

$("#saltPassword").val(encryptPassword($(LOGIN_PASSWORD_ID).val(), $("#pwdEncryptSalt").val()));

*/



    const urlParams = new URLSearchParams(window.location.search);
    const pwd = urlParams.get('pwd');
    const salt = urlParams.get('salt');

    var LOGIN_PASSWORD_ID = pwd;
    var pwdEncryptSalt = salt;
    var $aes_chars = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678";
    var aes_chars_len = $aes_chars.length;
    var saltPassword = encryptPassword(LOGIN_PASSWORD_ID, pwdEncryptSalt);
    // var decryptedPassword = decryptPassword(LOGIN_PASSWORD_ID, pwdEncryptSalt);


    // console.log(randomString(64));
    // console.log(saltPassword);
    // console.log(decryptedPassword)


    document.getElementById("encryptPassword").innerHTML = saltPassword;


    function randomString(n) {
        var f = "";
        for (i = 0; i < n; i++)
            f += $aes_chars.charAt(Math.floor(Math.random() * aes_chars_len));
        return f
    }

    var CryptoJS = CryptoJS.default || function (n, f) {

        var c = {}
            , q = c.lib = {}
            , u = function () { }
            , v = q.Base = {
                extend: function (a) {
                    u.prototype = this;
                    var e = new u;
                    a && e.mixIn(a);
                    e.hasOwnProperty("init") || (e.init = function () {
                        e.$super.init.apply(this, arguments)
                    }
                    );
                    e.init.prototype = e;
                    e.$super = this;
                    return e
                },
                create: function () {
                    var a = this.extend();
                    a.init.apply(a, arguments);
                    return a
                },
                init: function () { },
                mixIn: function (a) {
                    for (var e in a)
                        a.hasOwnProperty(e) && (this[e] = a[e]);
                    a.hasOwnProperty("toString") && (this.toString = a.toString)
                },
                clone: function () {
                    return this.init.prototype.extend(this)
                }
            }
            , r = q.WordArray = v.extend({
                init: function (a, e) {
                    a = this.words = a || [];
                    this.sigBytes = e != f ? e : 4 * a.length
                },
                toString: function (a) {
                    return (a || w).stringify(this)
                },
                concat: function (a) {
                    var e = this.words
                        , d = a.words
                        , g = this.sigBytes;
                    a = a.sigBytes;
                    this.clamp();
                    if (g % 4)
                        for (var p = 0; p < a; p++)
                            e[g + p >>> 2] |= (d[p >>> 2] >>> 24 - p % 4 * 8 & 255) << 24 - (g + p) % 4 * 8;
                    else if (65535 < d.length)
                        for (p = 0; p < a; p += 4)
                            e[g + p >>> 2] = d[p >>> 2];
                    else
                        e.push.apply(e, d);
                    this.sigBytes += a;
                    return this
                },
                clamp: function () {
                    var a = this.words
                        , e = this.sigBytes;
                    a[e >>> 2] &= 4294967295 << 32 - e % 4 * 8;
                    a.length = n.ceil(e / 4)
                },
                clone: function () {
                    var a = v.clone.call(this);
                    a.words = this.words.slice(0);
                    return a
                },
                random: function (a) {
                    for (var e = [], d = 0; d < a; d += 4)
                        e.push(4294967296 * n.random() | 0);
                    return new r.init(e, a)
                }
            })
            , x = c.enc = {}
            , w = x.Hex = {
                stringify: function (a) {
                    var e = a.words;
                    a = a.sigBytes;
                    for (var d = [], g = 0; g < a; g++) {
                        var p = e[g >>> 2] >>> 24 - g % 4 * 8 & 255;
                        d.push((p >>> 4).toString(16));
                        d.push((p & 15).toString(16))
                    }
                    return d.join("")
                },
                parse: function (a) {
                    for (var e = a.length, d = [], g = 0; g < e; g += 2)
                        d[g >>> 3] |= parseInt(a.substr(g, 2), 16) << 24 - g % 8 * 4;
                    return new r.init(d, e / 2)
                }
            }
            , b = x.Latin1 = {
                stringify: function (a) {
                    var e = a.words;
                    a = a.sigBytes;
                    for (var d = [], g = 0; g < a; g++)
                        d.push(String.fromCharCode(e[g >>> 2] >>> 24 - g % 4 * 8 & 255));
                    return d.join("")
                },
                parse: function (a) {
                    for (var e = a.length, d = [], g = 0; g < e; g++)
                        d[g >>> 2] |= (a.charCodeAt(g) & 255) << 24 - g % 4 * 8;
                    return new r.init(d, e)
                }
            }
            , y = x.Utf8 = {
                stringify: function (a) {
                    try {
                        return decodeURIComponent(escape(b.stringify(a)))
                    } catch (e) {
                        throw Error("Malformed UTF-8 data");
                    }
                },
                parse: function (a) {
                    return b.parse(unescape(encodeURIComponent(a)))
                }
            }
            , t = q.BufferedBlockAlgorithm = v.extend({
                reset: function () {
                    this._data = new r.init;
                    this._nDataBytes = 0
                },
                _append: function (a) {
                    "string" == typeof a && (a = y.parse(a));
                    this._data.concat(a);
                    this._nDataBytes += a.sigBytes
                },
                _process: function (a) {
                    var e = this._data
                        , d = e.words
                        , g = e.sigBytes
                        , p = this.blockSize
                        , b = g / (4 * p)
                        , b = a ? n.ceil(b) : n.max((b | 0) - this._minBufferSize, 0);
                    a = b * p;
                    g = n.min(4 * a, g);
                    if (a) {
                        for (var t = 0; t < a; t += p)
                            this._doProcessBlock(d, t);
                        t = d.splice(0, a);
                        e.sigBytes -= g
                    }
                    return new r.init(t, g)
                },
                clone: function () {
                    var a = v.clone.call(this);
                    a._data = this._data.clone();
                    return a
                },
                _minBufferSize: 0
            });
        q.Hasher = t.extend({
            cfg: v.extend(),
            init: function (a) {
                this.cfg = this.cfg.extend(a);
                this.reset()
            },
            reset: function () {
                t.reset.call(this);
                this._doReset()
            },
            update: function (a) {
                this._append(a);
                this._process();
                return this
            },
            finalize: function (a) {
                a && this._append(a);
                return this._doFinalize()
            },
            blockSize: 16,
            _createHelper: function (a) {
                return function (b, d) {
                    return (new a.init(d)).finalize(b)
                }
            },
            _createHmacHelper: function (a) {
                return function (b, d) {
                    return (new A.HMAC.init(a, d)).finalize(b)
                }
            }
        });
        var A = c.algo = {};
        return c
    }(Math);

    (function () {
        var n = CryptoJS;
        // console.log(n);
        var f = n.lib.WordArray;
        n.enc.Base64 = {
            stringify: function (c) {
                var f = c.words
                    , u = c.sigBytes
                    , v = this._map;
                c.clamp();
                c = [];
                for (var r = 0; r < u; r += 3)
                    for (var n = (f[r >>> 2] >>> 24 - r % 4 * 8 & 255) << 16 | (f[r + 1 >>> 2] >>> 24 - (r + 1) % 4 * 8 & 255) << 8 | f[r + 2 >>> 2] >>> 24 - (r + 2) % 4 * 8 & 255, w = 0; 4 > w && r + .75 * w < u; w++)
                        c.push(v.charAt(n >>> 6 * (3 - w) & 63));
                if (f = v.charAt(64))
                    for (; c.length % 4;)
                        c.push(f);
                return c.join("")
            },
            parse: function (c) {
                var q = c.length
                    , u = this._map
                    , n = u.charAt(64);
                n && (n = c.indexOf(n),
                    -1 != n && (q = n));
                for (var n = [], r = 0, x = 0; x < q; x++)
                    if (x % 4) {
                        var w = u.indexOf(c.charAt(x - 1)) << x % 4 * 2
                            , b = u.indexOf(c.charAt(x)) >>> 6 - x % 4 * 2;
                        n[r >>> 2] |= (w | b) << 24 - r % 4 * 8;
                        r++
                    }
                return f.create(n, r)
            },
            _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d"
        }
    }
    )();
    (function (n) {
        function f(b, c, a, e, d, g, p) {
            b = b + (c & a | ~c & e) + d + p;
            return (b << g | b >>> 32 - g) + c
        }
        function c(b, c, a, e, d, g, p) {
            b = b + (c & e | a & ~e) + d + p;
            return (b << g | b >>> 32 - g) + c
        }
        function q(b, c, a, e, d, g, p) {
            b = b + (c ^ a ^ e) + d + p;
            return (b << g | b >>> 32 - g) + c
        }
        function u(b, c, a, e, d, g, p) {
            b = b + (a ^ (c | ~e)) + d + p;
            return (b << g | b >>> 32 - g) + c
        }
        for (var v = CryptoJS, r = v.lib, x = r.WordArray, w = r.Hasher, r = v.algo, b = [], y = 0; 64 > y; y++)
            b[y] = 4294967296 * n.abs(n.sin(y + 1)) | 0;
        r = r.MD5 = w.extend({
            _doReset: function () {
                this._hash = new x.init([1732584193, 4023233417, 2562383102, 271733878])
            },
            _doProcessBlock: function (t, n) {
                for (var a = 0; 16 > a; a++) {
                    var e = n + a
                        , d = t[e];
                    t[e] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360
                }
                var a = this._hash.words
                    , e = t[n + 0]
                    , d = t[n + 1]
                    , g = t[n + 2]
                    , p = t[n + 3]
                    , B = t[n + 4]
                    , r = t[n + 5]
                    , w = t[n + 6]
                    , x = t[n + 7]
                    , v = t[n + 8]
                    , C = t[n + 9]
                    , D = t[n + 10]
                    , E = t[n + 11]
                    , A = t[n + 12]
                    , F = t[n + 13]
                    , G = t[n + 14]
                    , y = t[n + 15]
                    , h = a[0]
                    , m = a[1]
                    , k = a[2]
                    , l = a[3]
                    , h = f(h, m, k, l, e, 7, b[0])
                    , l = f(l, h, m, k, d, 12, b[1])
                    , k = f(k, l, h, m, g, 17, b[2])
                    , m = f(m, k, l, h, p, 22, b[3])
                    , h = f(h, m, k, l, B, 7, b[4])
                    , l = f(l, h, m, k, r, 12, b[5])
                    , k = f(k, l, h, m, w, 17, b[6])
                    , m = f(m, k, l, h, x, 22, b[7])
                    , h = f(h, m, k, l, v, 7, b[8])
                    , l = f(l, h, m, k, C, 12, b[9])
                    , k = f(k, l, h, m, D, 17, b[10])
                    , m = f(m, k, l, h, E, 22, b[11])
                    , h = f(h, m, k, l, A, 7, b[12])
                    , l = f(l, h, m, k, F, 12, b[13])
                    , k = f(k, l, h, m, G, 17, b[14])
                    , m = f(m, k, l, h, y, 22, b[15])
                    , h = c(h, m, k, l, d, 5, b[16])
                    , l = c(l, h, m, k, w, 9, b[17])
                    , k = c(k, l, h, m, E, 14, b[18])
                    , m = c(m, k, l, h, e, 20, b[19])
                    , h = c(h, m, k, l, r, 5, b[20])
                    , l = c(l, h, m, k, D, 9, b[21])
                    , k = c(k, l, h, m, y, 14, b[22])
                    , m = c(m, k, l, h, B, 20, b[23])
                    , h = c(h, m, k, l, C, 5, b[24])
                    , l = c(l, h, m, k, G, 9, b[25])
                    , k = c(k, l, h, m, p, 14, b[26])
                    , m = c(m, k, l, h, v, 20, b[27])
                    , h = c(h, m, k, l, F, 5, b[28])
                    , l = c(l, h, m, k, g, 9, b[29])
                    , k = c(k, l, h, m, x, 14, b[30])
                    , m = c(m, k, l, h, A, 20, b[31])
                    , h = q(h, m, k, l, r, 4, b[32])
                    , l = q(l, h, m, k, v, 11, b[33])
                    , k = q(k, l, h, m, E, 16, b[34])
                    , m = q(m, k, l, h, G, 23, b[35])
                    , h = q(h, m, k, l, d, 4, b[36])
                    , l = q(l, h, m, k, B, 11, b[37])
                    , k = q(k, l, h, m, x, 16, b[38])
                    , m = q(m, k, l, h, D, 23, b[39])
                    , h = q(h, m, k, l, F, 4, b[40])
                    , l = q(l, h, m, k, e, 11, b[41])
                    , k = q(k, l, h, m, p, 16, b[42])
                    , m = q(m, k, l, h, w, 23, b[43])
                    , h = q(h, m, k, l, C, 4, b[44])
                    , l = q(l, h, m, k, A, 11, b[45])
                    , k = q(k, l, h, m, y, 16, b[46])
                    , m = q(m, k, l, h, g, 23, b[47])
                    , h = u(h, m, k, l, e, 6, b[48])
                    , l = u(l, h, m, k, x, 10, b[49])
                    , k = u(k, l, h, m, G, 15, b[50])
                    , m = u(m, k, l, h, r, 21, b[51])
                    , h = u(h, m, k, l, A, 6, b[52])
                    , l = u(l, h, m, k, p, 10, b[53])
                    , k = u(k, l, h, m, D, 15, b[54])
                    , m = u(m, k, l, h, d, 21, b[55])
                    , h = u(h, m, k, l, v, 6, b[56])
                    , l = u(l, h, m, k, y, 10, b[57])
                    , k = u(k, l, h, m, w, 15, b[58])
                    , m = u(m, k, l, h, F, 21, b[59])
                    , h = u(h, m, k, l, B, 6, b[60])
                    , l = u(l, h, m, k, E, 10, b[61])
                    , k = u(k, l, h, m, g, 15, b[62])
                    , m = u(m, k, l, h, C, 21, b[63]);
                a[0] = a[0] + h | 0;
                a[1] = a[1] + m | 0;
                a[2] = a[2] + k | 0;
                a[3] = a[3] + l | 0
            },
            _doFinalize: function () {
                var b = this._data
                    , c = b.words
                    , a = 8 * this._nDataBytes
                    , e = 8 * b.sigBytes;
                c[e >>> 5] |= 128 << 24 - e % 32;
                var d = n.floor(a / 4294967296);
                c[(e + 64 >>> 9 << 4) + 15] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360;
                c[(e + 64 >>> 9 << 4) + 14] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360;
                b.sigBytes = 4 * (c.length + 1);
                this._process();
                b = this._hash;
                c = b.words;
                for (a = 0; 4 > a; a++)
                    e = c[a],
                        c[a] = (e << 8 | e >>> 24) & 16711935 | (e << 24 | e >>> 8) & 4278255360;
                return b
            },
            clone: function () {
                var b = w.clone.call(this);
                b._hash = this._hash.clone();
                return b
            }
        });
        v.MD5 = w._createHelper(r);
        v.HmacMD5 = w._createHmacHelper(r)
    }
    )(Math);
    (function () {
        var n = CryptoJS
            , f = n.lib
            , c = f.Base
            , q = f.WordArray
            , f = n.algo
            , u = f.EvpKDF = c.extend({
                cfg: c.extend({
                    keySize: 4,
                    hasher: f.MD5,
                    iterations: 1
                }),
                init: function (c) {
                    this.cfg = this.cfg.extend(c)
                },
                compute: function (c, n) {
                    for (var f = this.cfg, r = f.hasher.create(), b = q.create(), u = b.words, t = f.keySize, f = f.iterations; u.length < t;) {
                        v && r.update(v);
                        var v = r.update(c).finalize(n);
                        r.reset();
                        for (var a = 1; a < f; a++)
                            v = r.finalize(v),
                                r.reset();
                        b.concat(v)
                    }
                    b.sigBytes = 4 * t;
                    return b
                }
            });
        n.EvpKDF = function (c, f, n) {
            return u.create(n).compute(c, f)
        }
    }
    )();
    CryptoJS.lib.Cipher || function (n) {
        var f = CryptoJS
            , c = f.lib
            , q = c.Base
            , u = c.WordArray
            , v = c.BufferedBlockAlgorithm
            , r = f.enc.Base64
            , x = f.algo.EvpKDF
            , w = c.Cipher = v.extend({
                cfg: q.extend(),
                createEncryptor: function (d, a) {
                    return this.create(this._ENC_XFORM_MODE, d, a)
                },
                createDecryptor: function (d, a) {
                    return this.create(this._DEC_XFORM_MODE, d, a)
                },
                init: function (d, a, b) {
                    this.cfg = this.cfg.extend(b);
                    this._xformMode = d;
                    this._key = a;
                    this.reset()
                },
                reset: function () {
                    v.reset.call(this);
                    this._doReset()
                },
                process: function (d) {
                    this._append(d);
                    return this._process()
                },
                finalize: function (d) {
                    d && this._append(d);
                    return this._doFinalize()
                },
                keySize: 4,
                ivSize: 4,
                _ENC_XFORM_MODE: 1,
                _DEC_XFORM_MODE: 2,
                _createHelper: function (d) {
                    return {
                        encrypt: function (b, p, c) {
                            return ("string" == typeof p ? e : a).encrypt(d, b, p, c)
                        },
                        decrypt: function (b, p, c) {
                            return ("string" == typeof p ? e : a).decrypt(d, b, p, c)
                        }
                    }
                }
            });
        c.StreamCipher = w.extend({
            _doFinalize: function () {
                return this._process(!0)
            },
            blockSize: 1
        });
        var b = f.mode = {}
            , y = function (d, a, b) {
                var g = this._iv;
                g ? this._iv = n : g = this._prevBlock;
                for (var c = 0; c < b; c++)
                    d[a + c] ^= g[c]
            }
            , t = (c.BlockCipherMode = q.extend({
                createEncryptor: function (d, a) {
                    return this.Encryptor.create(d, a)
                },
                createDecryptor: function (d, a) {
                    return this.Decryptor.create(d, a)
                },
                init: function (d, a) {
                    this._cipher = d;
                    this._iv = a
                }
            })).extend();
        t.Encryptor = t.extend({
            processBlock: function (d, a) {
                var b = this._cipher
                    , g = b.blockSize;
                y.call(this, d, a, g);
                b.encryptBlock(d, a);
                this._prevBlock = d.slice(a, a + g)
            }
        });
        t.Decryptor = t.extend({
            processBlock: function (a, b) {
                var d = this._cipher
                    , g = d.blockSize
                    , c = a.slice(b, b + g);
                d.decryptBlock(a, b);
                y.call(this, a, b, g);
                this._prevBlock = c
            }
        });
        b = b.CBC = t;
        t = (f.pad = {}).Pkcs7 = {
            pad: function (a, b) {
                for (var d = 4 * b, d = d - a.sigBytes % d, g = d << 24 | d << 16 | d << 8 | d, c = [], e = 0; e < d; e += 4)
                    c.push(g);
                d = u.create(c, d);
                a.concat(d)
            },
            unpad: function (d) {
                d.sigBytes -= d.words[d.sigBytes - 1 >>> 2] & 255
            }
        };
        c.BlockCipher = w.extend({
            cfg: w.cfg.extend({
                mode: b,
                padding: t
            }),
            reset: function () {
                w.reset.call(this);
                var d = this.cfg
                    , a = d.iv
                    , d = d.mode;
                if (this._xformMode == this._ENC_XFORM_MODE)
                    var b = d.createEncryptor;
                else
                    b = d.createDecryptor,
                        this._minBufferSize = 1;
                this._mode = b.call(d, this, a && a.words)
            },
            _doProcessBlock: function (a, b) {
                this._mode.processBlock(a, b)
            },
            _doFinalize: function () {
                var a = this.cfg.padding;
                if (this._xformMode == this._ENC_XFORM_MODE) {
                    a.pad(this._data, this.blockSize);
                    var b = this._process(!0)
                } else
                    b = this._process(!0),
                        a.unpad(b);
                return b
            },
            blockSize: 4
        });
        var A = c.CipherParams = q.extend({
            init: function (a) {
                this.mixIn(a)
            },
            toString: function (a) {
                return (a || this.formatter).stringify(this)
            }
        })
            , b = (f.format = {}).OpenSSL = {
                stringify: function (a) {
                    var d = a.ciphertext;
                    a = a.salt;
                    return (a ? u.create([1398893684, 1701076831]).concat(a).concat(d) : d).toString(r)
                },
                parse: function (a) {
                    a = r.parse(a);
                    var b = a.words;
                    if (1398893684 == b[0] && 1701076831 == b[1]) {
                        var d = u.create(b.slice(2, 4));
                        b.splice(0, 4);
                        a.sigBytes -= 16
                    }
                    return A.create({
                        ciphertext: a,
                        salt: d
                    })
                }
            }
            , a = c.SerializableCipher = q.extend({
                cfg: q.extend({
                    format: b
                }),
                encrypt: function (a, b, c, e) {
                    e = this.cfg.extend(e);
                    var d = a.createEncryptor(c, e);
                    b = d.finalize(b);
                    d = d.cfg;
                    return A.create({
                        ciphertext: b,
                        key: c,
                        iv: d.iv,
                        algorithm: a,
                        mode: d.mode,
                        padding: d.padding,
                        blockSize: a.blockSize,
                        formatter: e.format
                    })
                },
                decrypt: function (a, b, c, e) {
                    e = this.cfg.extend(e);
                    b = this._parse(b, e.format);
                    return a.createDecryptor(c, e).finalize(b.ciphertext)
                },
                _parse: function (a, b) {
                    return "string" == typeof a ? b.parse(a, this) : a
                }
            })
            , f = (f.kdf = {}).OpenSSL = {
                execute: function (a, b, c, e) {
                    e || (e = u.random(8));
                    a = x.create({
                        keySize: b + c
                    }).compute(a, e);
                    c = u.create(a.words.slice(b), 4 * c);
                    a.sigBytes = 4 * b;
                    return A.create({
                        key: a,
                        iv: c,
                        salt: e
                    })
                }
            }
            , e = c.PasswordBasedCipher = a.extend({
                cfg: a.cfg.extend({
                    kdf: f
                }),
                encrypt: function (b, c, e, f) {
                    f = this.cfg.extend(f);
                    e = f.kdf.execute(e, b.keySize, b.ivSize);
                    f.iv = e.iv;
                    b = a.encrypt.call(this, b, c, e.key, f);
                    b.mixIn(e);
                    return b
                },
                decrypt: function (b, c, e, f) {
                    f = this.cfg.extend(f);
                    c = this._parse(c, f.format);
                    e = f.kdf.execute(e, b.keySize, b.ivSize, c.salt);
                    f.iv = e.iv;
                    return a.decrypt.call(this, b, c, e.key, f)
                }
            })
    }();
    (function () {
        for (var n = CryptoJS, f = n.lib.BlockCipher, c = n.algo, q = [], u = [], v = [], r = [], x = [], w = [], b = [], y = [], t = [], A = [], a = [], e = 0; 256 > e; e++)
            a[e] = 128 > e ? e << 1 : e << 1 ^ 283;
        for (var d = 0, g = 0, e = 0; 256 > e; e++) {
            var p = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4
                , p = p >>> 8 ^ p & 255 ^ 99;
            q[d] = p;
            u[p] = d;
            var B = a[d]
                , H = a[B]
                , I = a[H]
                , z = 257 * a[p] ^ 16843008 * p;
            v[d] = z << 24 | z >>> 8;
            r[d] = z << 16 | z >>> 16;
            x[d] = z << 8 | z >>> 24;
            w[d] = z;
            z = 16843009 * I ^ 65537 * H ^ 257 * B ^ 16843008 * d;
            b[p] = z << 24 | z >>> 8;
            y[p] = z << 16 | z >>> 16;
            t[p] = z << 8 | z >>> 24;
            A[p] = z;
            d ? (d = B ^ a[a[a[I ^ B]]],
                g ^= a[a[g]]) : d = g = 1
        }
        var J = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
            , c = c.AES = f.extend({
                _doReset: function () {
                    for (var a = this._key, d = a.words, c = a.sigBytes / 4, a = 4 * ((this._nRounds = c + 6) + 1), e = this._keySchedule = [], f = 0; f < a; f++)
                        if (f < c)
                            e[f] = d[f];
                        else {
                            var g = e[f - 1];
                            f % c ? 6 < c && 4 == f % c && (g = q[g >>> 24] << 24 | q[g >>> 16 & 255] << 16 | q[g >>> 8 & 255] << 8 | q[g & 255]) : (g = g << 8 | g >>> 24,
                                g = q[g >>> 24] << 24 | q[g >>> 16 & 255] << 16 | q[g >>> 8 & 255] << 8 | q[g & 255],
                                g ^= J[f / c | 0] << 24);
                            e[f] = e[f - c] ^ g
                        }
                    d = this._invKeySchedule = [];
                    for (c = 0; c < a; c++)
                        f = a - c,
                            g = c % 4 ? e[f] : e[f - 4],
                            d[c] = 4 > c || 4 >= f ? g : b[q[g >>> 24]] ^ y[q[g >>> 16 & 255]] ^ t[q[g >>> 8 & 255]] ^ A[q[g & 255]]
                },
                encryptBlock: function (a, b) {
                    this._doCryptBlock(a, b, this._keySchedule, v, r, x, w, q)
                },
                decryptBlock: function (a, c) {
                    var d = a[c + 1];
                    a[c + 1] = a[c + 3];
                    a[c + 3] = d;
                    this._doCryptBlock(a, c, this._invKeySchedule, b, y, t, A, u);
                    d = a[c + 1];
                    a[c + 1] = a[c + 3];
                    a[c + 3] = d
                },
                _doCryptBlock: function (a, b, c, d, e, f, g, h) {
                    for (var m = this._nRounds, k = a[b] ^ c[0], l = a[b + 1] ^ c[1], n = a[b + 2] ^ c[2], p = a[b + 3] ^ c[3], q = 4, r = 1; r < m; r++)
                        var t = d[k >>> 24] ^ e[l >>> 16 & 255] ^ f[n >>> 8 & 255] ^ g[p & 255] ^ c[q++]
                            , u = d[l >>> 24] ^ e[n >>> 16 & 255] ^ f[p >>> 8 & 255] ^ g[k & 255] ^ c[q++]
                            , v = d[n >>> 24] ^ e[p >>> 16 & 255] ^ f[k >>> 8 & 255] ^ g[l & 255] ^ c[q++]
                            , p = d[p >>> 24] ^ e[k >>> 16 & 255] ^ f[l >>> 8 & 255] ^ g[n & 255] ^ c[q++]
                            , k = t
                            , l = u
                            , n = v;
                    t = (h[k >>> 24] << 24 | h[l >>> 16 & 255] << 16 | h[n >>> 8 & 255] << 8 | h[p & 255]) ^ c[q++];
                    u = (h[l >>> 24] << 24 | h[n >>> 16 & 255] << 16 | h[p >>> 8 & 255] << 8 | h[k & 255]) ^ c[q++];
                    v = (h[n >>> 24] << 24 | h[p >>> 16 & 255] << 16 | h[k >>> 8 & 255] << 8 | h[l & 255]) ^ c[q++];
                    p = (h[p >>> 24] << 24 | h[k >>> 16 & 255] << 16 | h[l >>> 8 & 255] << 8 | h[n & 255]) ^ c[q++];
                    a[b] = t;
                    a[b + 1] = u;
                    a[b + 2] = v;
                    a[b + 3] = p
                },
                keySize: 8
            });
        n.AES = f._createHelper(c)
    }
    )();
    function getAesString(n, f, c) {
        console.log("执行getAesString");
        f = f.replace(/(^\s+)|(\s+$)/g, "");
        console.log("f:" + f);
        // console.log(CryptoJS);
        f = CryptoJS.enc.Utf8.parse(f);
        c = CryptoJS.enc.Utf8.parse(c);
        console.log("f:" + f);
        console.log("c:" + c);
        return CryptoJS.AES.encrypt(n, f, {
            iv: c,
            mode: CryptoJS.mode.CBC,
            padding: CryptoJS.pad.Pkcs7
        }).toString()
    }
    function encryptAES(n, f) {
        console.log("执行encryptAES");
        return f ? getAesString(randomString(64) + n, f, randomString(16)) : n
    }
    function encryptPassword(n, f) {
        console.log("执行encryptPassword");
        try {
            return encryptAES(n, f)
        } catch (c) { }
        return n
    }

    function decryptPassword(n, f) {
        var c = CryptoJS.enc.Utf8.parse(f)
            , q = CryptoJS.enc.Utf8.parse(randomString(16))
            , c = CryptoJS.AES.decrypt(n, c, {
                iv: q,
                mode: CryptoJS.mode.CBC,
                padding: CryptoJS.pad.Pkcs7
            });
        return CryptoJS.enc.Utf8.stringify(c).substring(64)
    }
    ;


</script>

</html>